const mongoose = require('./db');

// 定义用户 Schema
const userSchema = new mongoose.Schema({
    username: { type: String, required: true },
    password: { type: String, required: true },
    email: { type: String, required: false },
    createdAt: { type: Date, default: Date.now },
    root: { type: Number, default: 0 },
});

// 创建用户模型
const User = mongoose.model('User', userSchema);

module.exports = User;